package com.su27.document;

import com.su27.document.convert.Converter;
import com.su27.document.convert.ConverterListener;

public class TestConverter {

	public void convert(String srcfile,String picPath,String outputPath) {
		String textWaterMark = "水印";
		String imgWaterMark = "c:/2.jpg";
		
		ConverterListener listener = new TestConverterListener(picPath,textWaterMark,imgWaterMark,outputPath);
		//支持pdf/doc/xls/ppt/docx/xlsx/pptx格式
		try {
			Converter.document2jpg(srcfile, picPath,listener);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}


		
	}
	
	public static void main(String args[]) {
		
			try {
				
				String srcPath = "c:/doc";
				String textWaterMark = "水印";
				String imgWaterMark = "c:/2.jpg";
				String outputPath = "c:/document";
				
				ConverterListener listener = new TestConverterListener(srcPath,textWaterMark,imgWaterMark,outputPath);
				//支持pdf/doc/xls/ppt/docx/xlsx/pptx格式
				Converter.document2jpg("c:/test/BuildReporter2010.xlsx", "c:/doc",listener);

				
			} catch (Exception e) {
				e.printStackTrace();
			}

			

		
	}

}
